﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Harkon.AppServer.cOne.Service;

namespace Harkon.AppServer.cOne.Events
{
    public delegate void EventConsumerDelegate(string eventParameter);

    public static class InfrastructureTopics
    {
        public const string NEW_CLUSTER_PARTICIPATE = "topic:/infrastructure/cluster/new";
        public const string DEPARTED_CLUSTER_PARTICIPATE = "topic:/infrastructure/cluster/gone";
        public const string MULTICAST_CHECK_DONE = "topic:/infrastructure/cluster/check";
    }

    public interface IEventManager : ICoreService
    {
        void Subscribe(string topic, EventConsumerDelegate targetDelegate);
        void Publish(string topic, string eventParameter);
    }
}
